# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kup
pkgver=0.9.1
pkgrel=3
pkgdesc="A KDE bup backup software for helping people to keep up-to-date backups"
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kio
arch="all !armhf !s390x !riscv64"
url="https://store.kde.org/p/1127689"
license="GPL-2.0-only"
depends="rsync"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kidletime-dev
	kinit-dev
	kio-dev
	kjobwidgets-dev
	knotifications-dev
	kwidgetsaddons-dev
	libgit2-dev
	plasma-framework-dev
	qt5-qtbase-dev
	samurai
	solid-dev
	"
source="https://download.kde.org/stable/kup/kup-$pkgver.tar.xz
	0001-fix-build.patch
	"
options="!check" # No tests
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8906c33ce489fb049ce6223180693e1f5fa97762ff0a45eb68dbd8bad0b816b7ef500f13f1299a4ae75785a48825fc442b39fc0af1a5ef64b5f854d9fac9cc33  kup-0.9.1.tar.xz
945b4651d3a5b06d7b0e1296f57043251dbf2bebe2d4c02dac8b16024221c565e34158ffa0d459370ade4a247eb211dd20c5ec5ec3b21a922fa0136377bfdda2  0001-fix-build.patch
"
